Next | Prev | Up | Top | Contents | Index

Synchronized Schedulers: the Sync-Master Process

A variety of program designs is possible but the simplest is possibly the set of processes described in the following paragraphs.

The master process executes first and performs these steps:

  1. Initialize global resources such as memory-mapped segments, memory arenas, files, asynchronous I/O, and other resources. One global resource is the process ID of the master process.

  2. Lock the address space shared with lightweight processes.

  3. Create the sync-master Frame Scheduler using the call frs_create_master(), and store its handle in a global location.

  4. Create one FRS control process for each synchronized CPU to be used.

  5. Create the activity processes that will be scheduled by the master Frame Scheduler and use frs_enqueue() to enqueue them to their assigned minor frames.

  6. Set up signal handlers for signals from the Frame Scheduler (see "Using Signals Under the Frame Scheduler").

  7. Use frs_start() (Table 7-1) to tell the master Frame Scheduler that its activity processes are all enqueued.

    The master Frame Scheduler will start scheduling processes as soon as all processes have called frs_join() for their respective schedulers.

  8. Wait for termination or error signals.

  9. Use frs_destroy() to terminate the master Frame Scheduler.

  10. Tidy up global resources as required.

Next | Prev | Up | Top | Contents | Index